<?php $this->load->view('base/header'); ?>

<link rel="stylesheet" media="screen" href="<?php echo base_url() . 'css/jquery.datatable.gui.css' ?>"/>
<link rel="stylesheet" media="screen" href="<?php echo base_url() . 'css/jquery-ui-1.8.14.custom.css' ?>"/>
<link rel="stylesheet" media="screen" href="<?php echo base_url().'css/table.css'?>"/>
<script type="text/javascript" src="<?php echo base_url() . 'js/jquery.formatCurrency-1.4.0.js' ?>"></script>

<script type="text/javascript" src="<?php echo base_url() . 'js/jquery-ui-1.8.14.custom.min.js' ?>"></script>
<script type="text/javascript" src="<?php echo base_url() . 'js/jquery.dataTables.js' ?>"></script>
<script type="text/javascript" src="<?php echo base_url() . 'js/jquery.dataTables.ajaxPlugin.js' ?>"></script>
<script type="text/javascript" src="<?php echo base_url() . 'js/br-06/barang_rencana.js' ?>"></script>
<script type="text/javascript" src="<?php echo base_url() . 'js/br-06/suplier.js' ?>"></script>

<section>
    <div class="container_8 clearfix">

        <!-- Main Section -->

        <section class="main-section grid_8">

            <!-- Statistics Section -->
            <div class="main-content">
                <header>
                    <h2>
                        Order Pembelian
                    </h2>
                </header>
                <section class="container_6 clearfix">
                    <div class="grid_6">
                        <section class="clearfix">
                            <form class="form" id="order-pembelian">
                                <div style="float: left;">
                                    <div class="clearfix">
                                        <label>No Order<small></small></label>
                                        <input type="text" name="NOMER_ORDER" id="NOMER_ORDER" maxlength="20" />
                                        <input type="hidden" name="ID_ORDER" id="ID_ORDER" maxlength="12" />
                                        <!--<button class="button button-gray" id="add_no_order"><span class="accept"></span>Add</button>-->
                                    </div>
                                    <div class="clearfix">
                                        <label>Tanggal Pembelian<small>yyyy-mm-dd</small></label>
                                        <input type="date" name="TGL_ORDER" id="TGL_ORDER" />
                                    </div>
                                    <div class="clearfix">
                                        <label>Kode Supplier<small></small></label>
                                        <input type="text" name="SUPLIER" readonly id="SUPLIER"  />
                                    </div>
                                    <div class="clearfix">
                                        <label>Nama Supplier<small></small></label>
                                        <input type="text" name="NAMASUPLIER" readonly id="NAMASUPLIER"  />
                                    </div>
                                </div>
                                <div style="float: left;">
                                    <div class="clearfix">
                                        <label>Total<small></small></label>
                                        <input type="text" name="TOTAL" readonly id="TOTAL" class="currency" />
                                    </div>
                                    <!--<div class="clearfix">
                                        <label>Diskon<small>%</small></label>
                                        <input type="text" name="DISKON" id="DISKON" />
                                    </div>
                                    <div class="clearfix">
                                        <label>PPn<small></small></label>
                                        <input type="text" name="PPN" id="PPN" />
                                    </div>
                                    <div class="clearfix">
                                        <label>Grand Total<small></small></label>
                                        <input type="text" name="ALL_TOTAL" readonly id="ALL_TOTAL" />
                                    </div>-->
                                </div>
                                <div class="action clearfix">
                                    <button class="button button-gray" id="add_order" type="submit"><span class="accept"></span>Tambahkan</button>
                                    <button class="button button-gray" id="update_order" type="submit"><span class="disk"></span>Simpan</button>
                                    <button class="button button-gray" id="clear_order" type="reset"><span class="bin"></span>Batalkan</button>
                                    <button class="button button-gray" id="delete_order" type="submit"><span class="bin"></span>Hapus</button>
                                    <button class="button button-gray" id="cetak_order" type="submit"><span class="bin"></span>Cetak</button>
                                </div>
                            </form>
                        </section>


                        <!-- ajax table -->
                        <div style="float: right; margin: 0 5px 3px 0;">
                            <button class="button button-gray" id="barang_add"><span class="add"></span>Tambah Barang</button>
                        </div>

                        <table id="barang_order_master" width="100%" class="detail_table">
                            <thead>
                                <tr>
                                    <th>ID Barang</th>
                                    <th>Nama Barang</th>
                                    <th>Jumlah</th>
                                    <th>Harga Beli / Unit</th>
                                    <th>Sub Total</th>
                                    <th>Hapus</th>
                                </tr>
                            </thead>
                            <tbody>
                            </tbody>
                            <tfoot></tfoot>
                        </table>


                        <div id="dialog-barang">
                            <table id="barang_master" width="100%" class="datatable">
                                <thead>
                                </thead>
                                <tbody>
                                </tbody>
                            </table>
                        </div>

                        <div id="dialog-suplier">
                            <table id="suplier_master" width="100%" class="datatable">
                                <thead>
                                </thead>
                                <tbody>
                                </tbody>
                            </table>
                        </div>
                        <!-- end ajax table -->

                    </div>
                </section>

            </div>
            <!-- End Statistics Section -->

        </section>

        <!-- Main Section End -->

        <div id="dialog-barang-form">
            <form id="barang_form" class="form" method="post">
                <div style="float: left">
                    <div class="clearfix">
                        <label>ID Barang</label>
                        <input type="text" id="ID_BARANG" readonly name="ID_BARANG" value=""/>
                    </div>
                    <div class="clearfix">
                        <label>Nama Barang</label>
                        <input type="text" id="NAMA_BARANG" readonly name="NAMA_BARANG" value=""/>
                    </div>
                    <div class="clearfix">
                        <label>Satuan</label>
                        <input type="text" id="SATUAN" readonly name="SATUAN" value=""/>
                    </div>
                </div>
                <div style="float: left">
                    <div class="clearfix">
                        <label>Harga Satuan</label>
                        <input type="text" id="HARGA_BELI" readonly name="HARGA_BELI" value=""/>
                    </div>
                    <div class="clearfix">
                        <label>Jumlah Unit</label>
                        <input type="text" id="UNIT" name="UNIT" value="" style="width: 30px;" maxlength="4" size="4"/>
                    </div>
                    <div class="clearfix">
                        <label>Total</label>
                        <input type="text" id="HARGA" readonly name="HARGA" value=""/>
                    </div>
                </div>
                <div class="action clearfix">
                    <button class="button button-gray" id="add_barang" type="submit"><span class="accept"></span>Tambah</button>
                    <button class="button button-gray" type="reset"><span class="bin"></span>Batalkan</button>
                </div>
            </form>
        </div>

        

    </div>
</section>
</div>

<?php $this->load->view('base/footer'); ?>
